<!--  项目投资 -->
<template>
  <div class="table w1021 fund_project">
    <div class="tableTh tableTr flex">
      <span class="tableTd w220">截止日期</span>
      <span class="tableTd w220">项目名称</span>
      <span class="tableTd w220">
        计划总
        <br />投资额(万元)
      </span>
      <span class="tableTd w220">
        承诺投
        <br />资总额(万元)
      </span>
      <span class="tableTd w220">净利润(元)</span>
      <span class="tableTd w220">项目建设期(天)</span>
      <span class="tableTd w220">
        财务内部
        <br />收益率(%)
      </span>
      <span class="tableTd w220">投资回收期(天)</span>
      <span class="tableTd w220">项目主要内容</span>
    </div>
    <div class="tableTr tableBody top flex" v-for="(item,index) in data" :key="index">
      <span class="orange tableTd w220">{{item.declareDate|filterVal}}</span>
      <span class="orange tableTd w220">{{item.prjName|filterVal}}</span>
      <span class="orange tableTd w220">{{item.ivstPlan|filterVal("numberNo")}}</span>
      <span class="orange tableTd w220">{{item.ttlIvstPlan|filterVal}}</span>
      <span class="orange tableTd w220">{{item.grsPrft|filterVal}}</span>
      <span class="orange tableTd w220">{{item.cstrYear|filterVal}}</span>
      <span class="orange tableTd w220">{{item.irr|filterVal}}</span>
      <span class="orange tableTd w220">{{item.ivstTp|filterVal}}</span>
      <span class="tableTd w220 cursor" @click="detail(item)" v-if="item.prjMainInfo">查看</span>
      <span class="orange tableTd w220 cursor" v-else>--</span>
      <!-- <span class="orange tableTd w220">{{item.prjMainInfo|filterVal}}</span> -->
    </div>
    <div class="tableNone orange w1021 top" v-if="data.length==0">暂无数据</div>
  </div>
</template>

<script>
import {BASE_URL} from "@/common/const";
import { numberNo } from "../../script/api";
export default {
  data() {
    return {};
  },
  props: ["data"],
  filters: {
    filterVal(ops, num) {
      if (num == "numberNo") {
        return numberNo(ops, num);
      }
      return ops ? ops : "--";
    }
  },
  methods: {
    detail(ops) {
      const url = `${BASE_URL}/client/projectDetail/dev.html`;
      window.prompt(
        "",
        `up://["open.web",${Date.now()},{"url":"${url}?${Date.now()}&id=${
          ops.id
        }&code=${
          window._stockCode
        }","title":"资本运作--项目投资","popuptype":1}]`
      );
    }
  }
};
</script>
<style lang='scss' scoped>
</style>